#include "sdkGlobal.h"
#include "platform_global.h"

typedef struct
{
    ScriptUploadTradeFunc mScriptUploadTradeFunc;
    RecordPlatformFunc mRecordPlatformFunc;
} platform_script_upload_entity;

static platform_script_upload_entity g_platform_script_upload_entity;

void platform_script_upload_init()
{
    memset(&g_platform_script_upload_entity, 0x00, sizeof(platform_script_upload_entity));
}

void platform_script_upload_set_trade_func(ScriptUploadTradeFunc func)
{
    g_platform_script_upload_entity.mScriptUploadTradeFunc = func;
}

ScriptUploadTradeFunc platform_script_upload_get_trade_func()
{
    return g_platform_script_upload_entity.mScriptUploadTradeFunc;
}

void platform_script_upload_set_record_func(RecordPlatformFunc *platformFunc)
{
    memcpy(&g_platform_script_upload_entity.mRecordPlatformFunc, platformFunc, sizeof(RecordPlatformFunc));
}

RecordPlatformFunc *platform_script_upload_get_record_func()
{
    return &g_platform_script_upload_entity.mRecordPlatformFunc;
}
